package com.aaa.dao;

import com.aaa.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select * from user where uid=#{param1}")
    Map<String,Object> finduser(Integer uid); //根据uid查询user信息

    @Update("update user set name=#{name}" +
            ",sex=#{sex},phone=#{phone},idcard=#{idcard} where uid=#{uid}")
    Integer updateuser(User user); //修改个人信息

    @Update("update user set password=#{param1} where uid=#{param2}")
    Integer updpass(String password,Integer id); //修改密码

    List<User> find(Integer pageSize,Integer pageNum);
    Integer findcount();
    int add(User user);
    int delete(Integer uid);
    public int update(User user);
    List<User> finduser();
    List<User> findauditor();
}
